Skip to content

Conversation

howydev
Copy link
Contributor

@howydev howydev commented Mar 26, 2025

  1. [feat, large] added a utility to get the smallest entity id for a modular account using a utility contract. this is done via an eth_call deployment to reduce the number of round trips to obtaining both values. solidity code is here

  2. [feat, small] added a helper function to build the full MA v2 nonce given the variables - the u152 nonceKey, the entity id, and the global validation/deferred actions flag

  3. [chore, small] added a salt variable to the test file. In our current test file, it is not obvious but tests have a dependency on each other in terms of certain state. A good workaround is to set a different account salt each test, so we regain test independence


PR-Codex overview

This PR introduces a new entityIdAndNonceReader with its ABI and bytecode, enhances nonce handling in DeferralActions, and adds a method to retrieve entity IDs and nonces. It also updates tests to validate these changes.

Detailed summary

  • Added entityIdAndNonceReaderAbi and entityIdAndNonceReaderBytecode in entityIdAndNonceReader.ts.
  • Introduced BuildNonceParams type and buildFullNonceKey function in utils.ts.
  • Updated DeferralActions with getEntityIdAndNonce method.
  • Modified nonce handling in createDeferredActionTypedDataObject.
  • Enhanced tests in client.test.ts to validate entity ID and nonce selection.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Mar 26, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
aa-sdk-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 2, 2025 8:13pm
aa-sdk-ui-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 2, 2025 8:13pm

Copy link
Contributor

graphite-app bot commented Mar 26, 2025

How to use the Graphite Merge Queue

Add the label graphite-merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@howydev
Copy link
Contributor Author

howydev commented Mar 27, 2025

also -> rename DeferralActions.ts to deferralActions.ts for consistency

dphilipson
dphilipson previously approved these changes Apr 1, 2025
Copy link
Contributor

@dphilipson dphilipson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Left a suggestion in the tests.

@howydev howydev force-pushed the howy/add-entityid-and-nonce-reader branch from 16fe1c4 to d7f99b8 Compare April 2, 2025 19:56
@howydev howydev merged commit be94492 into main Apr 2, 2025
7 checks passed
@howydev howydev deleted the howy/add-entityid-and-nonce-reader branch April 2, 2025 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants